package com.YCH.login.controller.v1;

import com.YCH.apis.register.apis.RegisterControllerApi;
import com.YCH.login.service.TbUserRegisterService;
import com.YCH.model.common.dtos.ResponseResult;
import com.YCH.model.user.dtos.registerDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/register")
public class RegisterController implements RegisterControllerApi {
    @Autowired
    private TbUserRegisterService tbUserRegisterService;

    @Override
    @PostMapping("/register_auth")
    public ResponseResult register(@RequestBody registerDto dto) {
        return tbUserRegisterService.register(dto);
    }

    @Override
    @GetMapping("/get_image_verify_code")
    public ResponseResult getImageVerify() {
        return tbUserRegisterService.getImageVerifyCode();
    }
}
